import Vue from 'vue'
import App from './App'
import store from './store'
// import validCode from './components/validCode.vue'
import jigou from './pages/jigou/jigou'
import pa from './pages/jigou/pa'
import dingdan from './pages/jigou/dingdan'
import friend from './pages/tabBer/friend/friend'
// import unirouter from './components/uni-rate/uni-rate.vue'
import paike from './pages/jigou/paike'
import shouji from './pages/jigou/shouji'
import jigoudingdan from './pages/jigou/jigoudingdan'
import daojishi from './pages/jigou/daojishi'
import index from './pages/jigou/index'
import qw from './pages/jigou/qw'
import newjigou from './pages/jigou/newjigou'
import newjigoushu from './pages/jigou/newjigoushu'
import kaquan from './pages/jigou/kaquan'
import baobao from './pages/jigou/baobao'
Vue.component('baobao',baobao)
Vue.component('kaquan',kaquan)
Vue.component('newjigoushu',newjigoushu)
Vue.component('newjigou',newjigou)
Vue.component('index',index)
Vue.component('daojishi',daojishi)
// Vue.component('validcode',validCode)
Vue.component('friend',friend)
Vue.component('jigou',jigou)
Vue.component('pa',pa)
Vue.component('dingdan',dingdan)
// Vue.component('unirouter',unirouter)
Vue.component('paike',paike)
Vue.component('shouji',shouji)
Vue.component('jigoudingdan',jigoudingdan)
Vue.component('qw',qw)
import {
	myAjaxNew,
	myDate,
	ageChange,
	myToUserDetail,
	myToLogin,
	timeProcessing,
	myAjaxNewPost,
	timeFromDate,
	MD5,
	myRequest,
	RdWXBizDataCrypt,
	userInfoRefresh
} from 'common/common.js'
Vue.prototype.$userInfoRefresh = userInfoRefresh
Vue.prototype.$RdWXBizDataCrypt = RdWXBizDataCrypt
Vue.prototype.$myRequest = myRequest
Vue.prototype.myAjaxNew = myAjaxNew //get请求
Vue.prototype.myAjaxNewPost = myAjaxNewPost //post请求
Vue.prototype.myDate = myDate //日期处理
Vue.prototype.ageChange = ageChange //年龄处理
Vue.prototype.myToUserDetail = myToUserDetail //查看用户详情
Vue.prototype.myToLogin = myToLogin //登录判断
Vue.prototype.timeProcessing = timeProcessing //时间戳转化日期格式
Vue.prototype.timeFromDate = timeFromDate//时间戳转化日期格式（只有年月）
Vue.prototype.MD5 = MD5//md5加密
Vue.prototype.$store = store
// Vue.prototype.$TIM = tim
// Vue.prototype._i18n = i18n


Vue.directive('focus', {
	// 当被绑定的元素插入到 DOM 中时……
	inserted: function(el) {
		// 聚焦元素
		el.focus()
	},
})

Vue.config.productionTip = false
App.mpType = 'app'

const app = new Vue({
	...App,
	store
	// i18n
})
app.$mount()
